(*****************************************************************************
 * Delphi Plug-in Framework (DPF)
 * Copyright (C) 2006-2007 Tao Yuan
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the
 * License at http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.                                                               }
 *
 * The Initial Developer of the Original Code is Tao Yuan. Portions created by
 * Tao Yuan are Copyright (C) Tao Yuan (taoy.cn att gmail dott com)
 * All rights reserved.
 *****************************************************************************)
 
unit RDIntegrityCheckReport;

interface

uses
  Rcl,
  RDIdentity;

type

//==============================================================================
// IIntegrityCheckReport
//==============================================================================

  (**
   * Integrity check report element. Holds all information about particular
   * check event.
   * @version $Id: IntegrityCheckReport.java,v 1.2 2004/12/03 19:50:27 ddimon Exp $
   *)
  IReportItem = interface(IInterface)
  ['{5197406E-6BCF-4F53-BBDD-52CA07E607FE}']
    (**
     * @return severity code for this report item
     *)
    function getSeverity: Byte;
        
    (**
     * @return source for this report item, can be <code>null</code>
     *)
    function getSource: IIdentity;
        
    (**
     * @return error code for this report item
     *)
    function getCode: Integer;
        
    (**
     * @return message, associated with this report item
     *)
    function getMessage: String;
  end;

  (**
   * Result of validation performed by registry on all registered plug-ins. This
   * includes dependencies check, parameters check (against parameter definitions)
   * and any other kind of validation.
   * @version $Id: IntegrityCheckReport.java,v 1.2 2004/12/03 19:50:27 ddimon Exp $
   *)
  IIntegrityCheckReport = interface(IInterface)
  ['{A286F74E-C935-49D2-8937-1CC9065DC5FB}']
    (**
     * @return number of items with severity {@link ReportItem#SEVERITY_ERROR}
     *         in this report
     *)
    function countErrors: Integer;

    (**
     * @return number of items with severity {@link ReportItem#SEVERITY_WARNING}
     *         in this report
     *)
    function countWarnings: Integer;

    (**
     * @return collection of {@link ReportItem} objects
     *)
    function getItems: IIntfCollection;
  end;

implementation

end.
